package com.huarui.partner.action;

import java.util.HashMap;
import java.util.Map;

import org.apache.commons.lang.StringUtils;
import org.ewaf.framework.action.BaseAction;

import com.huarui.partner.service.PartnerService;

/**
 * 
 * @author ycf
 *
 */
public class PartnerAddAction extends BaseAction{

	private static final String MESS = "mess";
	
	private static final long serialVersionUID = 3463980767784587958L;
	
	private String companyId;
	
	private String relation;
	
	private Map<String, Object> mesMap;
	
	private PartnerService partnerService;
	
	public String getCompanyId() {
		return companyId;
	}

	public void setCompanyId(String companyId) {
		this.companyId = companyId;
	}

	public String getRelation() {
		return relation;
	}

	public void setRelation(String relation) {
		this.relation = relation;
	}

	public Map<String, Object> getMesMap() {
		return mesMap;
	}

	public void setMesMap(Map<String, Object> mesMap) {
		this.mesMap = mesMap;
	}

	public void setPartnerService(PartnerService partnerService) {
		this.partnerService = partnerService;
	}

//	public  String addPartner(){
//		if(StringUtils.isBlank(companyId)) {
//			mesMap = new HashMap<String, Object>();
//			mesMap.put("result", "companyIsNull");
//		} else {
//			Integer compId = null;
//			try {
//				compId = Integer.valueOf(companyId);
//			} catch (NumberFormatException ne) {
//				mesMap = new HashMap<String, Object>();
//				mesMap.put("result", "companyIsNull");
//				return MESS;
//			}
//			mesMap = partnerService.addPartnerOrUpdatePartner(compId, relation);
//		}
//		
//		return MESS;
//	}
	 
}
